<template>
  <div class="child-header">
    <div class="iconfont icon-return" @click="back"></div>
    <section class="title">
      <h1>{{headerDatas.title}}</h1>
    </section>
    <template v-if="headerDatas.hasTips">
      <div class="iconfont tips" :class="headerDatas.tipsIcon" @click="showTips"></div>
    </template>
  </div>  
</template>
<script>
export default {
  name: 'childHeader',
  props: {
    headerDatas: Object
  },
  data () {
    return {

    }
  },
  methods: {
    back: function () {
      this.$router.go(-1)
    },
    showTips: function () {
      this.$emit('showMask')
    }
  },
  created () {
  }
}
</script>
<style lang="scss" scoped>
  @import '../../assets/css/function.scss';
  .child-header{
    padding: 0 rem(24);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: rem(95);
    background: #fff;
    .icon-return{
      font-size: rem(36);
      color: #333;
    }
    .title{
      flex: 1;
      text-align: center;
      font-size: rem(32);
      color: #333;
    }
    .tips{
      font-size: rem(36);
      color: #333;
      font-weight: bold;
    }
  }
</style>
